import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    tagsList: []
  },
  mutations: {
    updateTagsList (state, tags) {
      state.tagsList = tags
    }
  },
  getters: {
    showTags (state) {
      return state.tagsList.length > 0
    }
  }
})

export default store
